package Test01;

/**
 * ClassName:
 * Package:Test01
 * Description:
 *
 * @Author 软件232班——欧阳昊淼
 * @Create 2024/4/12 17:39
 * @Version 1.8
 */
public class ShuiTest01 {
    public static void main(String[] args) {
        for (int i = 100; i < 1000; i++) {
            int a = i % 10;//个位
            int b = i % 100 / 10;//十位
            int c = i / 100;//百位

            if ((a * a * a + b * b * b + c * c * c) == i) {
                System.out.println(i);

                int arr[] = {153, 370, 371, 407};
                int Max = arr[0];

                for (int j = 0; j < arr.length; j++) {
                    if (arr[j] > Max) {
                        Max = arr[j];
                    }

                }

                System.out.println("最大值为:" + Max);
            }
        }
    }
}